package com.cqgc.service;

import com.cqgc.pojo.dto.RoleDTO.RoleAddDTO;
import com.cqgc.pojo.dto.RoleDTO.RoleUpdateDTO;
import com.cqgc.pojo.dto.RoleDTO.RoleParm;
import com.cqgc.pojo.entity.PageResult;
import com.cqgc.pojo.entity.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleService {
    PageResult list(RoleParm roleParm);

    //删除角色
    @Delete("delete from role where rid =#{rid}}")
    boolean removeById(int rid);

    //添加角色
    boolean addRole(RoleAddDTO roleDTO);

    //修改角色信息
    boolean updateRole(RoleUpdateDTO roleDTO);

    //获取角色下拉数据
    @Select("select * from role")
    List<Role> list();

    Role getOneAdd(RoleAddDTO roleDTO);
    Role getOneUpdate(RoleUpdateDTO roleDTO);

}
